package net.maku.other.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import net.maku.framework.common.utils.Result;
import net.maku.other.service.ChairmanMailboxService;
import net.maku.other.vo.AddChairmanMailboxVO;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: qr
 * @Date: 2025/3/27 23:44
 * @Version 1.0
 */
@RestController
@RequestMapping("chairman/mailboxt")
@Tag(name = "主席信箱")
@AllArgsConstructor
public class ChairmanMailboxController {

    private final ChairmanMailboxService chairmanMailboxService;

    @PostMapping("/apply")
    @Operation(summary = "添加主席信箱")
    public Result<String> apply(@ParameterObject @Valid AddChairmanMailboxVO mailboxVO) {
        chairmanMailboxService.apply(mailboxVO);
        return Result.ok();
    }

}
